<!DOCTYPE html>
<html>
  
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <Link Rel="SHORTCUT ICON" href="http://www.jd.com/favicon.ico">
    <title>我的购物车 - 京东商城</title>
    <meta name="_token" content="{{ csrf_token() }}" />
    <link type="text/css" rel="stylesheet" href="{{asset('/home/css/a_0025.css')}}">
    <script type="text/javascript" src="{{asset('/home/js/jquery-15.js')}}"></script>
    <script type="text/javascript" src="{{asset('/home/js/demo.js')}}"></script>
    <link rel="stylesheet" href="{{('/home/css/style.css')}}"/>
    <link source="widget" href="{{asset('/home/css/a5.css')}}" rel="stylesheet" type="text/css">
    <link type="text/css" rel="stylesheet" href="{{asset('/home/css/a_0035.css')}}" source="widget">
    <link href="{{asset('/home/css/area5.css')}}" rel="stylesheet" charset="utf-8">
    <style type="text/css">.fixed-bottom{position:fixed;bottom:0px;z-index:999}</style></head>
  <body>
    <div id="shortcut-2014">
      <div class="w">
        <ul class="fl">
          <li class="dorpdown" id="ttbar-mycity">
            <div class="dt cw-icon ui-areamini-text-wrap" style="">
              <i class="ci-right">
                <s>◇</s>
              </i>送至：
              <span title="北京" data-id="1" class="ui-areamini-text">北京</span></div>
            <div class="dd dorpdown-layer">
              <div class="dd-spacer"></div>
              <div class="ui-areamini-content-wrap">
                <div class="ui-areamini-content">
                  <div class="ui-areamini-content-list">
                    <div class="item">
                      <a class="selected" data-id="1" href="javascript:void(0)">北京</a></div>
                    <div class="item">
                      <a data-id="2" href="javascript:void(0)">上海</a></div>
                    <div class="item">
                      <a data-id="3" href="javascript:void(0)">天津</a></div>
                    <div class="item">
                      <a data-id="4" href="javascript:void(0)">重庆</a></div>
                    <div class="item">
                      <a data-id="5" href="javascript:void(0)">河北</a></div>
                    <div class="item">
                      <a data-id="6" href="javascript:void(0)">山西</a></div>
                    <div class="item">
                      <a data-id="7" href="javascript:void(0)">河南</a></div>
                    <div class="item">
                      <a data-id="8" href="javascript:void(0)">辽宁</a></div>
                    <div class="item">
                      <a data-id="9" href="javascript:void(0)">吉林</a></div>
                    <div class="item">
                      <a data-id="10" href="javascript:void(0)">黑龙江</a></div>
                    <div class="item">
                      <a data-id="11" href="javascript:void(0)">内蒙古</a></div>
                    <div class="item">
                      <a data-id="12" href="javascript:void(0)">江苏</a></div>
                    <div class="item">
                      <a data-id="13" href="javascript:void(0)">山东</a></div>
                    <div class="item">
                      <a data-id="14" href="javascript:void(0)">安徽</a></div>
                    <div class="item">
                      <a data-id="15" href="javascript:void(0)">浙江</a></div>
                    <div class="item">
                      <a data-id="16" href="javascript:void(0)">福建</a></div>
                    <div class="item">
                      <a data-id="17" href="javascript:void(0)">湖北</a></div>
                    <div class="item">
                      <a data-id="18" href="javascript:void(0)">湖南</a></div>
                    <div class="item">
                      <a data-id="19" href="javascript:void(0)">广东</a></div>
                    <div class="item">
                      <a data-id="20" href="javascript:void(0)">广西</a></div>
                    <div class="item">
                      <a data-id="21" href="javascript:void(0)">江西</a></div>
                    <div class="item">
                      <a data-id="22" href="javascript:void(0)">四川</a></div>
                    <div class="item">
                      <a data-id="23" href="javascript:void(0)">海南</a></div>
                    <div class="item">
                      <a data-id="24" href="javascript:void(0)">贵州</a></div>
                    <div class="item">
                      <a data-id="25" href="javascript:void(0)">云南</a></div>
                    <div class="item">
                      <a data-id="26" href="javascript:void(0)">西藏</a></div>
                    <div class="item">
                      <a data-id="27" href="javascript:void(0)">陕西</a></div>
                    <div class="item">
                      <a data-id="28" href="javascript:void(0)">甘肃</a></div>
                    <div class="item">
                      <a data-id="29" href="javascript:void(0)">青海</a></div>
                    <div class="item">
                      <a data-id="30" href="javascript:void(0)">宁夏</a></div>
                    <div class="item">
                      <a data-id="31" href="javascript:void(0)">新疆</a></div>
                    <div class="item">
                      <a data-id="32" href="javascript:void(0)">台湾</a></div>
                    <div class="item">
                      <a data-id="42" href="javascript:void(0)">香港</a></div>
                    <div class="item">
                      <a data-id="43" href="javascript:void(0)">澳门</a></div>
                    <div class="item">
                      <a data-id="84" href="javascript:void(0)">钓鱼岛</a></div>
                    <div class="item">
                      <a href="http://en.jd.com/" target="_blank" data-onchange="1">海外</a></div>
                  </div>
                </div>
              </div>
            </div>
          </li>
        </ul>
        <ul class="fr">
          <li class="fore1" id="ttbar-login">
            @if(!empty($user -> username))
              <a href="/user" target="_blank" class="link-user">{{$user -> username}}</a>&nbsp;&nbsp;
              <a href="/login/logout" class="link-logout">退出</a>
            @else
              <a href="/login" class="link-logout">登陆</a>
              <a href="/home/reg/add" class="link-logout">快速注册</a>
            @endif
          </li>
          <li class="spacer"></li>
          <li class="fore2">
            <div class="">
              <a target="_blank" href="">我的订单</a></div>
          </li>
          <li class="spacer"></li>
          <li class="fore3 dorpdown" id="ttbar-myjd">
            <div class="dt cw-icon">
              <i class="ci-right">
                <s>◇</s>
              </i>
              <a target="_blank" href="/user">我的京东</a></div>
            <div class="dd dorpdown-layer">
              <div class="dd-spacer"></div>
              <div class="dd-inner">
                <span class="loading"></span>
              </div>
          <li class="fore3 dorpdown" id="">
            <div class="">
              <a target="_blank" href="">我的京东</a></div>
            <div class="dorpdown-layer">
            </div>
          </li>
          <li class="spacer"></li>
          <li class="fore4">
            <div class="">
              <a target="_blank" href="">京东会员</a></div>
          </li>
        </ul>
        <span class="clr"></span>
      </div>
    </div>
    <div id="o-header-2013">
      <div id="header-2013" style="display:none;"></div>
    </div>
    <div class="w w1 header clearfix">
      <div id="logo">
        <a href="/" class="link1">
          <img src="{{asset('/home/images/logo.png')}}" alt="京东商城"></a>
        <a href="#none" class="link2">
          <b>
          </b>购物车</a>
      </div>
      <div class="cart-search">
        <div class="form">
          <input style="color: rgb(51, 51, 51);" id="key" class="itxt" autocomplete="off" accesskey="s" type="text">
          <input class="button" value="搜索" clstag="clickcart|keycount|xincart|cart_search" onclick="javascript:void(0);" type="button"></div>
      </div>
    </div>
    <!-- main -->
    <div id="container" class="cart">
      <div class="w">
        <div id="chunjie" class="mb10"></div>
        <div class="cart-filter-bar">
          <ul class="switch-cart">
            <li class="switch-cart-item curr">
              <a href="#none">
                <em>全部商品</em>
                </a>
            </li>
          </ul>

          <div class="clr"></div>
          {{--getTotal--}}
          <div style="display: block;" class="tab-con ui-switchable-panel-selected"></div>
          <div style="display: none;" class="tab-con hide"></div>
        </div>
      </div>
      {{--购物车--}}

      <div class="cart-item-list" style="margin: 0 auto;width: 65%;">
        <table id="cartTable" style="width:990px;">
          <thead class="foot">
          <tr>
            <th><label>
                <input class="check-all check" type="checkbox"/>&nbsp;&nbsp;全选</label></th>
            <th>商品</th>
            <th>单价</th>
            <th>数量</th>
            <th>小计</th>
            <th>操作</th>
          </tr>
          </thead>
          <tbody>
          @foreach($goods as $v)
          <tr data-value="{{$v -> id}}">
            <td class="checkbox">&nbsp;&nbsp;&nbsp;<input value="{{$v->id}}"  class="check-one check" type="checkbox"/></td>
            <td class="goods"><img src="{{$v -> goods_pic}}" alt=""/><span>{{$v -> goods_name}} <br> {{$v -> size}}号 {{$v -> color}}</span></td>

            <td class="price">{{$v -> price}}</td>
            <td class="count"><span class="reduce"></span>
              <input class="count-input" id="shop-{{$v->id}}-num" type="text" value="{{$v -> num}}"/>
              <span class="add">+</span></td>
            <td class="subtotal">{{$v -> price}}</td>
            <td class="operation"><span class="delete">删除</span></td>
          </tr>
          @endforeach
          </tbody>
        </table>
        <div class="foot" id="foot">
          <label class="fl select-all"><input type="checkbox" class="check-all check"/>&nbsp;&nbsp;全选</label>
          <a class="fl delete" id="deleteAll" href="javascript:;"></a>
          <div class="fr closing" onclick="balance();">结 算</div>
          <input type="hidden" id="cartTotalPrice" />
          <div class="fr total">合计：￥<span id="priceTotal">0.00</span></div>
          <div class="fr selected" id="selected">已选商品<span id="selectedTotal">0</span>件</div>
          <div class="selected-view">
            <div id="selectedViewList" class="clearfix">
              <div><img src="images/1.jpg"><span>取消选择</span></div>
            </div>
            <span class="arrow">◆<span>◆</span></span> </div>
        </div>
      </div>

      <div class="w">
        <div class="m m1" id="c-tabs-new">
          <div class="mt">
            <div class="extra-l">
              <a href="#none" class="c-item curr">猜你喜欢</a>
              </div>
            <div class="extra-r"></div>
          </div>
          <div style="position: relative;" class="mc c-panel-main">
            <div style="position: absolute; z-index: 1; opacity: 1;" class="c-panel ui-switchable-panel-selected" id="guess-products">

              <div style="position: relative;" class="mc c-panel-main">
                <div style="position: absolute; z-index: 1; opacity: 1;" class="goods-list c-panel ui-switchable-panel-selected">
                  <ul>
                    @foreach($good as $gs)
                    <li data-clk="" onclick="">

                      <div class="item">
                        <div class="p-img" clstag="pageclick|keycount|201601152|16">
                          <a target="_blank" href="/detail/{{$gs -> id}}">
                            <img src="{{$gs -> goods_pic}}" alt="{{$gs -> goods_name}}" height="160" width="160"></a>
                        </div>
                        <div class="p-name" clstag="pageclick|keycount|201601152|17">
                          <a target="_blank" href="/detail/{{$gs -> id}}">{{$gs -> goods_name}}</a></div>
                        <div class="p-price">
                          <strong>
                            <em>￥</em>
                            <i>{{$gs -> price}}</i>
                          </strong>
                        </div>
                        {{--<div class="p-btn" clstag="pageclick|keycount|cart__201503041|1">--}}
                          {{--<a href="#none" _pid="1133346" class="btn-append">--}}
                            {{--<b>--}}
                            {{--</b></a>--}}
                        {{--</div>--}}
                      </div>

                    </li>
                      @endforeach

                    </li>
                  </ul>
                </div>


                <div style="display: none;" class="c-page">
                  <a href="javascript:void(0)" class="c-prev">&lt;</a>
                  <a href="javascript:void(0)" class="c-next">&gt;</a></div>
              </div>
            </div>
            <div style="position: absolute; z-index: 0; opacity: 0;" class="c-panel" id="favorite-products">
              <div class="goods-list-tab">
                <a href="#none" class="s-item curr">&nbsp;</a>
                <a href="#none" class="s-item">&nbsp;</a>
                <a href="#none" class="s-item">&nbsp;</a></div>
              <div style="position: relative;" class="mc c-panel-main">

                <div class="c-page">
                  <a href="javascript:void(0)" class="c-prev">&lt;</a>
                  <a href="javascript:void(0)" class="c-next">&gt;</a></div>
              </div>
            </div>
            <div style="position: absolute; z-index: 0; opacity: 0; height: 247px; line-height: 247px;" class="c-panel" id="history-products">
              <div class="ac mt10">暂时无结果</div></div>
          </div>
        </div>
      </div>

    </div>
    <!-- /main -->
    <div id="service-2014">
      <div class="slogen">
        <span class="item fore1">
          <i>
          </i>
          <b>多</b>品类齐全，轻松购物</span>
        <span class="item fore2">
          <i>
          </i>
          <b>快</b>多仓直发，极速配送</span>
        <span class="item fore3">
          <i>
          </i>
          <b>好</b>正品行货，精致服务</span>
        <span class="item fore4">
          <i>
          </i>
          <b>省</b>天天低价，畅选无忧</span>
      </div>

    </div>
    <div class="w">
      <div id="footer-2014">
        <div class="links">
          <a rel="nofollow" target="_blank" href="">关于我们</a>|
          <a rel="nofollow" target="_blank" href="">联系我们</a>|
          <a rel="nofollow" target="_blank" href="">商家入驻</a>|
          <a rel="nofollow" target="_blank" href="">营销中心</a>|
          <a rel="nofollow" target="_blank" href="">手机京东</a>|
          <a target="_blank" href="http://club.jd.com/links.aspx">友情链接</a>|
          <a target="_blank" href="http://media.jd.com/">销售联盟</a>|
          <a href="http://club.jd.com/" target="_blank">京东社区</a>|
          <a href="http://gongyi.jd.com/" target="_blank">京东公益</a>|
          <a href="http://en.jd.com/" target="_blank">English Site</a>|
          <a href="http://en.jd.com/help/question-58.html" target="_blank">Contact Us</a></div>


      </div>
    </div>
  <form action="/cart/balance" method="post" id="cartform" style="display: none">
    {{ csrf_field() }}
      <input type="hidden" name="shop_id" id="shop_id">
      <input type="hidden" name="shop_num" id="shop_num">
  </form>
</body>
<script>
  function balance() {
    var shop_arr = [];
    var shop_num = [];
    var shop_id = 0;
    $.each($('.check-one:checkbox:checked'),function(){
      shop_id = $(this).val();
      shop_arr.push(shop_id);
      shop_num.push($('#shop-'+shop_id+'-num').val());
    });
    $('#shop_id').val('').val(shop_arr);
    $('#shop_num').val('').val(shop_num);
    $('#cartform').submit();
  }
</script>
</html>
